<template>
  <view :style="themeColor">
    <view class="page">
      <fu-custom :isBack="true" :isBottom="true" bgColor="bg-white">
        <view slot="content">{{name}}</view>
      </fu-custom>
      <!--     <view class="flex benben-position-layout flex flex-wrap align-center startPracticing_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub startPracticing_fd0_0'>
          <view class='flex flex-wrap align-center startPracticing_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  startPracticing_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='startPracticing_fd0_0_c1_c0'>{{name}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end startPracticing_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view> -->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout startPracticing_flex_1">
        <view class='flex flex-direction flex-wrap align-stretch startPracticing_fd1_0'>
          <template v-for='(item,key0) in chapterList'>
            <view class='flex flex-wrap align-center justify-between startPracticing_fd1_0_c0' :key='key0'
              @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/fyql/startReading/startReading?id=${item.aid}&book_id=${item.book_id}`">
              <text class='startPracticing_fd1_0_c0_c0'>{{item.title}}</text>
              <image class='startPracticing_fd1_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"63.png"'></image>
            </view>
          </template>
          <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
            :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "chapterList": [],
        "id": "",
        "name": ""
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        id,
        name
      } = options
      if (id !== undefined) this.id = id
      if (name !== undefined) this.name = name
      this.getChapterFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {
      this.getChapterFunc()
    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取章节列表
      getChapterFunc() {
        this.minixPagingListsApi = global.apiUrls.post657159556afa6;
        this.pageingListApiMethod = 'get';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          book_id: this.id
        }
        this.listData = [];
        this.chapterList = this.listData;
        this.pagingListToggle();

      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(247, 243, 237, 1);
    background-size: 100% auto;
  }

  .startPracticing_flex_0 {
    border-bottom: 1px solid #eee;
    background: rgba(247, 243, 237, 1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .startPracticing_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .startPracticing_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .startPracticing_fd0_0_c0 {
    width: 120rpx;
  }

  .startPracticing_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .startPracticing_flex_1 {
    padding: 32rpx 32rpx 0rpx 32rpx;
  }

  .startPracticing_fd1_0_c0_c1 {
    width: 14rpx;
    height: 26rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .startPracticing_fd1_0_c0_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 500;
    line-height: 42rpx;
  }

  .startPracticing_fd1_0_c0 {
    border-bottom: 1px solid rgba(238, 238, 238, 1);
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .startPracticing_fd1_0 {
    background: rgba(255, 255, 255, 1);
    border-radius: 40rpx;
    background-size: 100% auto;
    padding: 0rpx 24rpx 0rpx 24rpx;
  }
</style>
